package Var1022.Acatcatchesamouse;

//父类
public class Pet {
    private String name;//名字
    private int weight;//体重
    private int strength;//体力

    public Pet(String name, int strength) {
        this.name = name;
        this.strength = strength;
    }

    public Pet(String name, int weight, int strength) {
        this.name = name;
        this.weight = weight;
        this.strength = strength;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getStrength() {
        return strength;
    }

    public void setStrength(int strength) {
        this.strength = strength;
    }

    public void mzls() {
        System.out.println(name + "抓到了老鼠,老鼠被猫被咬死" + ",体力增加:" + (strength + strength) + ",老鼠的体力变成:" + (strength - strength));
    }

    public void show() {
        System.out.println("名字是:" + name + ",体重是:" + weight + ",它的体力是:" + strength);
    }

    public void show1() {
        System.out.println("名字是:" + name + ",它的体力是:" + strength);
    }
}
